{extend name="common/main"}

{block name="css"}
<!-- 本页面需要额外添加的css请在此处添加 -->
<link rel="stylesheet" href="/mobiled/css/index.css">
<script src="/mobiled/js/TouchSlide.1.1.js"></script>
<script src="/mobiled/js/jquery.json.js" type="text/javascript" ></script>
<script src="/mobiled/js/touchslider.dev.js" type="text/javascript" ></script>
{/block}

{block name="body"}
<body>
<div id="page" class="showpage">
    <div>
        <header id="header">
            <a href="{:url('Classify/index')}" class="top_bt"><img src="/assets/img/fenlei1.png"></a>
            <!-- <a href="{:url('classify/shoppingtrolley')}  " class="user_btn"></a> -->
            <span href="javascript:void(0)" class="logo"><img src="/assets/img/logo11.png"></span>
            <span class="search-header"><img src="/assets/img/icosousuo.png"></span>
        </header>

        <div id="scrollimg" class="scrollimg">
                <div class="bd">
                    <ul>
                        {volist name='Banner' id='v'}
                        <li>
                            <a href="{$v.ad_link}" style="margin: 0px;width: 100%" {if condition="$v.target eq 1"}target="_blank"{/if}>
                                <img src="{$v.ad_code}">
                            </a>
                        </li>
                        {/volist}
                    </ul>
                </div>
            <div class="hd">
                <ul>
                </ul>
            </div>
        </div>

        <div id="fake-search" class="index_search">
            <div class="index_search_mid">
                <span><img src="/assets/img/icosousuo.png"></span>
                <input type="text" id="search_text" class="search_text" placeholder="找一找你想要的商品">
            </div>
        </div>
        <div class="entry-list clearfix">
            <nav>
                <ul>
                    <li>
                        <a href="{:url('Classify/index')}">
                            <img alt="全部分类" src="/mobiled/images/xin.png">
                            <span>全部分类</span>
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <img alt="我的订单" src="/mobiled/images/cha.png">
                            <span>团购</span>
                        </a>
                    </li>
                    <li>
                        <a href="{:url('classify/shoppingtrolley')}">
                            <img alt="购物车" src="/mobiled/images/shang.png">
                            <span>购物车</span>
                        </a>
                    </li>
                    <li>
                        <a href="{:url('User/index')}"">
                            <img alt="个人中心" src="/mobiled/images/shi.png">
                            <span>个人中心</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>
<!--广告-->
        <div class="floor_images">
            <dl>
                <dt>
                    <a href="{$ad_one['ad_link']}">
                        <img  src="{$ad_one['ad_code']}" title="" style="" border="0">
                    </a>
                </dt>
                <dd>
                    <span class="Edge">
                        <a href="{$ad_two['ad_link']}">
                            <img src="{$ad_two['ad_code']}" title="" style="" border="0">
                        </a>
                    </span>
                    <span>
                        <a href="{$ad_three['ad_link']}">
                            <img src="{$ad_three['ad_code']}" title="" style="" border="0">
                        </a>
                    </span>
                </dd>
            </dl>
            <ul>
                <li class="brom">
                    <a href="{$ad_four['ad_link']}">
                        <img src="{$ad_four['ad_code']}" title="" style="" border="0">
                    </a>
                </li>
                <li>
                    <a href="{$ad_five['ad_link']}">
                        <img src="{$ad_five['ad_code']}" title="" style="" border="0">
                    </a>
                </li>
            </ul>
        </div>
        <section class="index_floor">
            <div class="floor_body1">
                <h2>精品推荐
                    <!--<div class="geng"> <a href="/index.php/mobile/Goods/search/q/%E7%B2%BE%E5%93%81.html">更多</a> <span></span></div>-->
                </h2>
                <div id="scroll_best" class="scroll_hot">
                        <div class="bd">
                        <ul>
                            {volist name='Recommended' id='v' key='k'}
                            <li>
                                <a href="{:Url('classify/goodsinfo')}?id={$v.goods_id}" title="{$v.goods_name}">

                                <div class="index_pro">
                                        <div class="products_kuang">
                                            <img src="/assets/img/tukuang.png" class="tukuang">
                                            <img src="{$v.goods_id|goods_thum_images=200,200}"></div>
                                        <div class="goods_name">{$v.goods_name}</div>

                                <div class="price">
                                    <a href="{:Url('classify/goodsinfo')}?id={$v.goods_id}" class="btns">
                                        <img src="/assets/img/index_flow.png">
                                    </a>
                                    <span href="{:Url('classify/goodsinfo')}?id={$v.goods_id}" class="price_pro">￥{$v.shop_price}元</span>
                                </div>
                                </div>
                                </a>
                            </li>
                                {if condition="($k%3 eq 0) && ($k lt 9)"}</ul><ul>{/if}
                            {/volist}
                        </ul>
                       </div>
                    <div class="hd">
                        <ul></ul>
                    </div>
                </div>
            </div>
        </section>

        <section class="index_floor">
            <div class="floor_body1">
                <h2>

                    新品上市
                    <!--<div class="geng"><a href="/index.php/mobile/Goods/search/q/%E6%96%B0%E5%93%81.html" >更多</a> <span></span></div>-->
                </h2>
                <div id="scroll_new" class="scroll_hot">
                    <div class="tempWrap" style="overflow:hidden; position:relative;">
                        <div class="bd">
                        <ul>
                            {volist name='Newproducts' id='v' key='k'}
                            <li>
                                <a href="{:Url('classify/goodsinfo')}?id={$v.goods_id}" title="{$v.goods_name}">
                                    <div class="index_pro">
                                        <div class="products_kuang">
                                            <img src="/assets/img/tukuang.png" class="tukuang">
                                            <img src="{$v.goods_id|goods_thum_images=200,200}"></div>
                                        <div class="goods_name">{$v.goods_name}</div>

                                        <div class="price">
                                            <a href="{:Url('classify/goodsinfo')}?id={$v.goods_id}" class="btns">
                                                <img src="/assets/img/index_flow.png">
                                            </a>
                                            <span href="{:Url('classify/goodsinfo')}?id={$v.goods_id}" class="price_pro">￥{$v.shop_price}元</span>
                                        </div>
                                    </div>
                                </a>
                            </li>
                            {if condition="($k%3 eq 0) && ($k lt 9)"}</ul><ul>{/if}
                            {/volist}
                        </ul>
                       </div>

                    <div class="hd">
                        <ul></ul>
                    </div>
                </div>
            </div>
            </div>
        </section>

        <section class="index_floor">
            <div class="floor_body1">
                <h2>热销商品
                    <!--<div class="geng"><a href="/index.php/mobile/Goods/search/q/%E7%83%AD%E9%94%80.html" >更多</a> <span></span></div>-->
                </h2>
                <div id="scroll_hot" class="scroll_hot">
                        <div class="bd">
                        <ul>
                            {volist name='Sellwell' id='v' key='k'}
                            <li>
                                <a href="{:Url('classify/goodsinfo')}?id={$v.goods_id}" title="{$v.goods_name}">
                                    <div class="index_pro">
                                        <div class="products_kuang">
                                            <img src="/assets/img/tukuang.png" class="tukuang">
                                            <img src="{$v.goods_id|goods_thum_images=200,200}"></div>
                                        <div class="goods_name">{$v.goods_name}</div>

                                        <div class="price">
                                            <a href="{:Url('classify/goodsinfo')}?id={$v.goods_id}" class="btns">
                                                <img src="/assets/img/index_flow.png">
                                            </a>
                                            <span href="{:Url('classify/goodsinfo')}?id={$v.goods_id}" class="price_pro">￥{$v.shop_price}元</span>
                                        </div>
                                    </div>
                                </a>
                            </li>

                            {if condition="($k%3 eq 0) && ($k lt 9)"}</ul><ul>{/if}
                            {/volist}</ul>
                        </div>

                    <div class="hd">
                        <ul></ul>
                    </div>
                </div>
            </div>
        </section>

        <section class="index_floor_lou">
            <div class="floor_body ">
                <h2>
                   <div class="geng"><a href="javascript:void(0);">更多</a> <span></span></div>
                </h2>
                <ul>
                </ul>
            </div>
        </section>

        <div id="index_banner" class="index_banner">
            <div class="bd">
                    <ul>
                        {volist name='Swbelowad' id='v'}
                        <li>
                            <a href="{$v.ad_link}" {if condition="$v.target eq 1"}target="_blank"{/if} >
                            <img src="{$v.ad_code}">
                            </a>
                        </li>
                        {/volist}
                    </ul>
            </div>
            <div class="hd">
                <ul></ul>
            </div>
        </div>


            <!--里面-->
        <div class="floor_body2">
            <h2>猜你喜欢</h2>
            <div id="J_ItemList">
                <ul class="product single_item info">
                </ul>
                <a href="javascript:;" class="get_more" style="text-align: center; display: none;">
                    <img src="/assets/img/loader.gif" width="12" height="12">
                </a>
            </div>
            <div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem;">
                <a href="javascript:void(0)" onclick="getGoodsList()">点击加载更多</a>
            </div>
        </div>

        <a href="javascript:goTop();" class="gotop"><img src="/assets/img/topup.png"></a>
    </div>


    <div id="J_demo" style="display:none"></div>
    <div id="search_hide" class="search_hide">
        <h2> <span class="close"><img src="/assets/img/close.png"></span>关键搜索</h2>
        <div id="mallSearch" class="search_mid">
            <div id="search_tips" style="display:none;"></div>
            <ul class="search-type">
                <li  class="cur"  num="0">宝贝</li>
                <!--<li  num="1">店铺</li>-->
            </ul>
            <div class="searchdotm">
                <form class="set_ip"name="sourch_form" id="sourch_form" method="post" action="{:Url('Goods/Search')}?q=$('#q').val()">
                    <div class="mallSearch-input">
                        <div id="s-combobox-135">
                            <input class="s-combobox-input" name="q" id="q"  placeholder="请输入关键词"  type="text" value="" />
                        </div>
                        <input type="button" value="" class="buttom"   onclick="if($.trim($('#q').val()) != '') $('#sourch_form').submit();" />
                    </div>
                </form>
            </div>
        </div>

<!--        <script type="text/javascript">
    $(function() {
        $('#search_text').click(function(){
            $(".showpage").children('div').hide();
            $("#search_hide").css('position','fixed').css('top','0px').css('width','100%').css('z-index','999').show();
        })
        $('#get_search_box').click(function(){
            $(".showpage").children('div').hide();
            $("#search_hide").css('position','fixed').css('top','0px').css('width','100%').css('z-index','999').show();
        })
        $("#search_hide .close").click(function(){
            $(".showpage").children('div').show();
            $("#search_hide").hide();
        })
    });
</script>
       -->
        <section class="mix_recently_search"><h3>热门搜索</h3>
            <ul>
               {volist name='Search' id='vo' key='k'}
                    <li><a href="{:Url('Goods/Search')}?q={$vo}" {if condition="$k eq 1"}class="ht"{/if}>{$vo}</a></li>
               {/volist}
            </ul>
        </section>
    </div>

<!---->
</div>

{include file="common/bar"}
<iframe name="WSDK_FRAME" style="display: none;"></iframe>
<form action="https://chat.etao.com/login/oauth" target="WSDK_FRAME" method="post" style="display: none;">
    <input type="hidden" name="cross" value="true">
    <input type="hidden" name="tokenFlag" value="64">
    <input type="hidden" name="uid" value="13800138006">
    <input type="hidden" name="credential" value="123456">
    <input type="hidden" name="appkey" value="23466016">
    <input type="hidden" name="toAppkey" value="23466016">
    <input type="hidden" name="ver" value="1.0.6">
</form>
</body>
{/block}

{block name="js"}
<!-- 本页面需要额外添加的js请在此处添加 -->
<!--<script src="https://g.alicdn.com/aliww/ww/json/json.js" charset="utf-8"></script>-->

<script type="text/javascript">
    TouchSlide({
        slideCell:"#scrollimg",
        titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
        mainCell:".bd ul",//要轮播的内容 图片
        effect:"leftLoop",//轮播方向 向左循环滚动
        autoPage:true,//自动分页
        autoPlay:true //自动播放
    });

    // 倒计时
    // function GetRTime2(){
    //     //var text = GetRTime('2016/02/27 17:34:00');
    //     var text119 = GetRTime('2016/05/31 00:00:00');
    //
    //     if (typeof(text119) == "undefined")
    //         $("#surplus_text119").text('活动已结束');
    //     else
    //         $("#surplus_text119").text(text119);var text141 = GetRTime('2019/05/03 00:00:00');
    //
    //     if (typeof(text141) == "undefined")
    //         $("#surplus_text141").text('活动已结束');
    //     else
    //         $("#surplus_text141").text(text141);var text100 = GetRTime('2019/05/27 00:00:00');
    //
    //     if (typeof(text100) == "undefined")
    //         $("#surplus_text100").text('活动已结束');
    //     else
    //         $("#surplus_text100").text(text100);	}
    // setInterval(GetRTime2,1000);


    TouchSlide({
        slideCell:"#scroll_best",
        titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
        effect:"leftLoop",
        autoPage:true, //自动分页
        //switchLoad:"_src" //切换加载，真实图片路径为"_src"
    });


    $(function(){
        //$('#J_ItemList').more({'address': url});
        getGoodsList();
    });
     page = 1;
    function getGoodsList(){

        $('.get_more').show();
        $.ajax({
            type : "get",
            url:"{:Url('ajaxGetMore')}",
            data:{
                'p':page
            },
            dataType:'json',
            success: function(data)
            {
                if (data.length == 0){
                    $('.get_more').hide();
                    $('#getmore').remove();
                }else{
                    $.each(data,function (k,v) {
                        $("#J_ItemList>ul").append(v);
                    })
                    page++;
                    $('.get_more').hide();
                }

            }
        });
    }

    function goodsinfo(a) {
        window.open("{:Url('classify/goodsinfo')}?id="+a+"");
    }

    TouchSlide({
        slideCell:"#scroll_new",
        titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
        effect:"leftLoop",
        autoPage:true, //自动分页
        //switchLoad:"_src" //切换加载，真实图片路径为"_src"
    });
</script>
<script type="text/javascript">
    TouchSlide({
        slideCell:"#scroll_hot",
        titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
        effect:"leftLoop",
        autoPage:true//自动分页
        //switchLoad:"_src" //切换加载，真实图片路径为"_src"
    });
</script>
<script type="text/javascript">
    TouchSlide({
        slideCell:"#index_banner",
        titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
        mainCell:".bd ul",
        effect:"leftLoop",
        autoPage:true,//自动分页
        autoPlay:true //自动播放
    });
</script>
<script>
    function goTop(){
        $('html,body').animate({'scrollTop':0},600);
    }
</script>
<script type="text/javascript">
    $(document).ready(function(){
        var cart_cn = getCookie('cn');
        if(cart_cn == ''){
            $.ajax({
                type : "GET",
                url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
                success: function(data){
                    cart_cn = getCookie('cn');
                    $('#cart_quantity').html(cart_cn);
                }
            });
        }
        $('#cart_quantity').html(cart_cn);
    });
</script>
<!-- 微信浏览器 调用微信 分享js-->
<!-- 微信浏览器 调用微信 分享js  end-->
<script type="text/javascript">
    $(function(){
        $('#search_text').click(function(){
            $(".showpage").children('div').hide();
            $("#search_hide").css('position','fixed').css('top','0px').css('width','100%').css('z-index','999').show();
        });
        $('#get_search_box').click(function(){
            $(".showpage").children('div').hide();
            $("#search_hide").css('position','fixed').css('top','0px').css('width','100%').css('z-index','999').show();
        });
        $("#search_hide .close").click(function(){
            $(".showpage").children('div').show();
            $("#search_hide").hide();
        })
    });
</script>
<script>
    $('.search-type li').click(function() {
        $(this).addClass('cur').siblings().removeClass('cur');
        $('#searchtype').val($(this).attr('num'));
    });
    $('#searchtype').val($(this).attr('0'));
</script>

<!--[if lt IE 9]>

<![endif]-->
<!-- 自动适配移动端与pc端 -->
<!--<script src="https://g.alicdn.com/aliww/??h5.openim.sdk/1.0.6/scripts/wsdk.js,h5.openim.kit/0.3.3/scripts/kit.js" charset="utf-8"></script>-->


<!--<script>-->
    <!--window.onload = function(){-->
        <!--WKIT.init({-->
            <!--container: document.getElementById('J_demo'),-->
            <!--width: 700,-->
            <!--height: 500,-->
            <!--uid: '13800138006',-->
            <!--appkey: 23466016,-->
            <!--credential: '123456',-->
            <!--touid: 'xuczg',-->
            <!--logo: 'http://img.alicdn.com/tps/i3/TB12LD9IFXXXXb3XpXXSyFWJXXX-82-82.png',-->
            <!--pluginUrl: 'http://www.taobao.com/market/seller/openim/plugindemo.php'-->
        <!--});-->
    <!--}-->
<!--</script>-->


{/block}